It is learned by teaching
Also translated "One learns by teaching." Attributed to Seneca the Younger.